package com.sprouting.ops.model;

import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.sprouting.ops.annotations.invoke.CheckIsNullOrEmpty;
import com.sprouting.ops.annotations.invoke.CheckLength;
import com.sprouting.ops.annotations.invoke.CheckNotNull;
import com.sprouting.ops.interfaces.AddGroup;
import com.sprouting.ops.interfaces.UpdGroup;
import lombok.Data;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableId;

/**
 * 系统配置(OpsSysConfig)(OPS_SYS_CONFIG) 表实体类
 *
 * @author ：lx（长沙麓谷）
 * @date 创建时间：2025-08-16 22:10:22
 */
@Data
@TableName("ops_sys_config")
public class OpsSysConfig {

    /**
     * 主键
     */
    @CheckNotNull(message = "非法ID", groups = UpdGroup.class)
    @CheckIsNullOrEmpty(message = "无效ID", groups = AddGroup.class)
    @TableId
    private String id;
    /**
     * 配置名称
     */
    @CheckNotNull(message = "请输入配置名称")
    @CheckLength(min = 1, max = 150, message = "配置名称超过长度限制")
    private String name;
    /**
     * 配置代码-有且唯一
     */
    @CheckNotNull(message = "请输入配置代码")
    @CheckLength(min = 1, max = 50, message = "配置代码超过长度限制")
    private String code;
    /**
     * 数据值
     */
    @TableField(updateStrategy = FieldStrategy.ALWAYS)
    private String value;
    /**
     * 详情
     */
    @TableField(updateStrategy = FieldStrategy.ALWAYS)
    private String description;

}
